using System;
using System.Collections.Generic;

namespace LS.Digitize
{
    public interface ICompoundSerializer : ISerializer
    {
        Type SubType { get; }
        Type SubType2 { get; }
        IReadOnlyCollection<Type> SubTypes { get; }
        ISerializer SubSerializer { get; }
        ISerializer SubSerializer2 { get; }
        IReadOnlyCollection<ISerializer> SubSerializers { get; }
        Type GetSubType(int index);
        ISerializer GetSubSerializer(int index);
        void ReadInto(IReader reader, ref object obj);
    }

    public interface ICompoundSerializer<T> : ICompoundSerializer, ISerializer<T>
    {
        void ReadInto(IReader reader, ref T obj);
    }
}